Optimal. Leaf size=147 \[ \frac {\sqrt {d} (3 b c-4 a d) \tan ^{-1}\left (\frac {\sqrt {d} \sqrt {a+\frac {b}{x}}}{\sqrt {b c-a d}}\right )}{c^3 \sqrt {b c-a d}}+\frac {(b c-4 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a} c^3}+\frac {2 d \sqrt {a+\frac {b}{x}}}{c^2 \left (c+\frac {d}{x}\right )}+\frac {x \sqrt {a+\frac {b}{x}}}{c \left (c+\frac {d}{x}\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 147, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {375, 99, 151, 156, 63, 208, 205} \[ \frac {2 d \sqrt {a+\frac {b}{x}}}{c^2 \left (c+\frac {d}{x}\right )}+\frac {\sqrt {d} (3 b c-4 a d) \tan ^{-1}\left (\frac {\sqrt {d} \sqrt {a+\frac {b}{x}}}{\sqrt {b c-a d}}\right )}{c^3 \sqrt {b c-a d}}+\frac {(b c-4 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a} c^3}+\frac {x \sqrt {a+\frac {b}{x}}}{c \left (c+\frac {d}{x}\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 63
Rule 99
Rule 151
Rule 156
Rule 205
Rule 208
Rule 375
Rubi steps
\begin {align*} \int \frac {\sqrt {a+\frac {b}{x}}}{\left (c+\frac {d}{x}\right )^2} \, dx &=-\operatorname {Subst}\left (\int \frac {\sqrt {a+b x}}{x^2 (c+d x)^2} \, dx,x,\frac {1}{x}\right )\\ &=\frac {\sqrt {a+\frac {b}{x}} x}{c \left (c+\frac {d}{x}\right )}-\frac {\operatorname {Subst}\left (\int \frac {\frac {1}{2} (b c-4 a d)-\frac {3 b d x}{2}}{x \sqrt {a+b x} (c+d x)^2} \, dx,x,\frac {1}{x}\right )}{c}\\ &=\frac {2 d \sqrt {a+\frac {b}{x}}}{c^2 \left (c+\frac {d}{x}\right )}+\frac {\sqrt {a+\frac {b}{x}} x}{c \left (c+\frac {d}{x}\right )}+\frac {\operatorname {Subst}\left (\int \frac {-\frac {1}{2} (b c-4 a d) (b c-a d)+b d (b c-a d) x}{x \sqrt {a+b x} (c+d x)} \, dx,x,\frac {1}{x}\right )}{c^2 (b c-a d)}\\ &=\frac {2 d \sqrt {a+\frac {b}{x}}}{c^2 \left (c+\frac {d}{x}\right )}+\frac {\sqrt {a+\frac {b}{x}} x}{c \left (c+\frac {d}{x}\right )}-\frac {(b c-4 a d) \operatorname {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,\frac {1}{x}\right )}{2 c^3}+\frac {(d (3 b c-4 a d)) \operatorname {Subst}\left (\int \frac {1}{\sqrt {a+b x} (c+d x)} \, dx,x,\frac {1}{x}\right )}{2 c^3}\\ &=\frac {2 d \sqrt {a+\frac {b}{x}}}{c^2 \left (c+\frac {d}{x}\right )}+\frac {\sqrt {a+\frac {b}{x}} x}{c \left (c+\frac {d}{x}\right )}-\frac {(b c-4 a d) \operatorname {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+\frac {b}{x}}\right )}{b c^3}+\frac {(d (3 b c-4 a d)) \operatorname {Subst}\left (\int \frac {1}{c-\frac {a d}{b}+\frac {d x^2}{b}} \, dx,x,\sqrt {a+\frac {b}{x}}\right )}{b c^3}\\ &=\frac {2 d \sqrt {a+\frac {b}{x}}}{c^2 \left (c+\frac {d}{x}\right )}+\frac {\sqrt {a+\frac {b}{x}} x}{c \left (c+\frac {d}{x}\right )}+\frac {\sqrt {d} (3 b c-4 a d) \tan ^{-1}\left (\frac {\sqrt {d} \sqrt {a+\frac {b}{x}}}{\sqrt {b c-a d}}\right )}{c^3 \sqrt {b c-a d}}+\frac {(b c-4 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a} c^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.39, size = 122, normalized size = 0.83 \[ \frac {\frac {c x \sqrt {a+\frac {b}{x}} (c x+2 d)}{c x+d}+\frac {\sqrt {d} (3 b c-4 a d) \tan ^{-1}\left (\frac {\sqrt {d} \sqrt {a+\frac {b}{x}}}{\sqrt {b c-a d}}\right )}{\sqrt {b c-a d}}+\frac {(b c-4 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}}}{c^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.36, size = 801, normalized size = 5.45 \[ \left [-\frac {{\left (b c d - 4 \, a d^{2} + {\left (b c^{2} - 4 \, a c d\right )} x\right )} \sqrt {a} \log \left (2 \, a x - 2 \, \sqrt {a} x \sqrt {\frac {a x + b}{x}} + b\right ) + {\left (3 \, a b c d - 4 \, a^{2} d^{2} + {\left (3 \, a b c^{2} - 4 \, a^{2} c d\right )} x\right )} \sqrt {-\frac {d}{b c - a d}} \log \left (-\frac {2 \, {\left (b c - a d\right )} x \sqrt {-\frac {d}{b c - a d}} \sqrt {\frac {a x + b}{x}} - b d + {\left (b c - 2 \, a d\right )} x}{c x + d}\right ) - 2 \, {\left (a c^{2} x^{2} + 2 \, a c d x\right )} \sqrt {\frac {a x + b}{x}}}{2 \, {\left (a c^{4} x + a c^{3} d\right )}}, -\frac {2 \, {\left (b c d - 4 \, a d^{2} + {\left (b c^{2} - 4 \, a c d\right )} x\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {-a} \sqrt {\frac {a x + b}{x}}}{a}\right ) + {\left (3 \, a b c d - 4 \, a^{2} d^{2} + {\left (3 \, a b c^{2} - 4 \, a^{2} c d\right )} x\right )} \sqrt {-\frac {d}{b c - a d}} \log \left (-\frac {2 \, {\left (b c - a d\right )} x \sqrt {-\frac {d}{b c - a d}} \sqrt {\frac {a x + b}{x}} - b d + {\left (b c - 2 \, a d\right )} x}{c x + d}\right ) - 2 \, {\left (a c^{2} x^{2} + 2 \, a c d x\right )} \sqrt {\frac {a x + b}{x}}}{2 \, {\left (a c^{4} x + a c^{3} d\right )}}, \frac {2 \, {\left (3 \, a b c d - 4 \, a^{2} d^{2} + {\left (3 \, a b c^{2} - 4 \, a^{2} c d\right )} x\right )} \sqrt {\frac {d}{b c - a d}} \arctan \left (-\frac {{\left (b c - a d\right )} x \sqrt {\frac {d}{b c - a d}} \sqrt {\frac {a x + b}{x}}}{a d x + b d}\right ) - {\left (b c d - 4 \, a d^{2} + {\left (b c^{2} - 4 \, a c d\right )} x\right )} \sqrt {a} \log \left (2 \, a x - 2 \, \sqrt {a} x \sqrt {\frac {a x + b}{x}} + b\right ) + 2 \, {\left (a c^{2} x^{2} + 2 \, a c d x\right )} \sqrt {\frac {a x + b}{x}}}{2 \, {\left (a c^{4} x + a c^{3} d\right )}}, \frac {{\left (3 \, a b c d - 4 \, a^{2} d^{2} + {\left (3 \, a b c^{2} - 4 \, a^{2} c d\right )} x\right )} \sqrt {\frac {d}{b c - a d}} \arctan \left (-\frac {{\left (b c - a d\right )} x \sqrt {\frac {d}{b c - a d}} \sqrt {\frac {a x + b}{x}}}{a d x + b d}\right ) - {\left (b c d - 4 \, a d^{2} + {\left (b c^{2} - 4 \, a c d\right )} x\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {-a} \sqrt {\frac {a x + b}{x}}}{a}\right ) + {\left (a c^{2} x^{2} + 2 \, a c d x\right )} \sqrt {\frac {a x + b}{x}}}{a c^{4} x + a c^{3} d}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.07, size = 943, normalized size = 6.41 \[ -\frac {\sqrt {\frac {a x +b}{x}}\, \left (4 a^{\frac {7}{2}} c \,d^{3} x \ln \left (\frac {-2 a d x +b c x -b d +2 \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, \sqrt {\left (a x +b \right ) x}\, c}{c x +d}\right )-7 a^{\frac {5}{2}} b \,c^{2} d^{2} x \ln \left (\frac {-2 a d x +b c x -b d +2 \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, \sqrt {\left (a x +b \right ) x}\, c}{c x +d}\right )+3 a^{\frac {3}{2}} b^{2} c^{3} d x \ln \left (\frac {-2 a d x +b c x -b d +2 \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, \sqrt {\left (a x +b \right ) x}\, c}{c x +d}\right )+4 \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, a^{3} c^{2} d^{2} x \ln \left (\frac {2 a x +b +2 \sqrt {\left (a x +b \right ) x}\, \sqrt {a}}{2 \sqrt {a}}\right )-5 \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, a^{2} b \,c^{3} d x \ln \left (\frac {2 a x +b +2 \sqrt {\left (a x +b \right ) x}\, \sqrt {a}}{2 \sqrt {a}}\right )+\sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, a \,b^{2} c^{4} x \ln \left (\frac {2 a x +b +2 \sqrt {\left (a x +b \right ) x}\, \sqrt {a}}{2 \sqrt {a}}\right )+4 a^{\frac {7}{2}} d^{4} \ln \left (\frac {-2 a d x +b c x -b d +2 \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, \sqrt {\left (a x +b \right ) x}\, c}{c x +d}\right )-7 a^{\frac {5}{2}} b c \,d^{3} \ln \left (\frac {-2 a d x +b c x -b d +2 \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, \sqrt {\left (a x +b \right ) x}\, c}{c x +d}\right )+2 \sqrt {\left (a x +b \right ) x}\, \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, a^{\frac {5}{2}} c^{4} x^{2}+3 a^{\frac {3}{2}} b^{2} c^{2} d^{2} \ln \left (\frac {-2 a d x +b c x -b d +2 \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, \sqrt {\left (a x +b \right ) x}\, c}{c x +d}\right )+4 \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, a^{3} c \,d^{3} \ln \left (\frac {2 a x +b +2 \sqrt {\left (a x +b \right ) x}\, \sqrt {a}}{2 \sqrt {a}}\right )-5 \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, a^{2} b \,c^{2} d^{2} \ln \left (\frac {2 a x +b +2 \sqrt {\left (a x +b \right ) x}\, \sqrt {a}}{2 \sqrt {a}}\right )+\sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, a \,b^{2} c^{3} d \ln \left (\frac {2 a x +b +2 \sqrt {\left (a x +b \right ) x}\, \sqrt {a}}{2 \sqrt {a}}\right )-2 \sqrt {\left (a x +b \right ) x}\, \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, a^{\frac {5}{2}} c^{3} d x +4 \sqrt {\left (a x +b \right ) x}\, \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, a^{\frac {3}{2}} b \,c^{4} x -4 \sqrt {\left (a x +b \right ) x}\, \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, a^{\frac {5}{2}} c^{2} d^{2}+4 \sqrt {\left (a x +b \right ) x}\, \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, a^{\frac {3}{2}} b \,c^{3} d -2 \left (\left (a x +b \right ) x \right )^{\frac {3}{2}} \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, a^{\frac {3}{2}} c^{4}\right ) x}{2 \sqrt {\left (a x +b \right ) x}\, \left (a d -b c \right ) \left (c x +d \right ) \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, a^{\frac {3}{2}} c^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {a + \frac {b}{x}}}{{\left (c + \frac {d}{x}\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.26, size = 1195, normalized size = 8.13 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x^{2} \sqrt {a + \frac {b}{x}}}{\left (c x + d\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________